home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-12 | 4.5 KB | 140 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Content.h
- // Release Version: $ ODF 2 $
- //
- // Written by: Mary Boetcher
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef CONTENT_H
- #define CONTENT_H
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWCONTNT_H
- #include "FWContnt.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CIntlTestPart;
- class FW_CEditView;
-
- //========================================================================================
- // class CIntlTestContent
- //========================================================================================
-
- class CIntlTestContent : public FW_CContent
- {
- public:
- FW_DECLARE_AUTO(CIntlTestContent)
-
- CIntlTestContent(Environment* ev, CIntlTestPart* part);
- virtual ~CIntlTestContent();
-
- public:
- virtual void ExternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CPromise* promise,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean InternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CCloneInfo* cloneInfo);
-
- //----------------------------------------------------------------------------------------
- // New Stuff
- //
- public:
- void ExternalizePartKind(Environment* ev, ODStorageUnit* destinationSU, ODType partKind);
- FW_Boolean InternalizePartKind(Environment* ev, ODStorageUnit* sourceSU, ODType partKind);
-
- const FW_CString& GetTextData(ODID whichView);
- void SetTextData(Environment* ev, const FW_CString& newText, ODID whichView);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- FW_CString255 fEnglishText;
- FW_CString fJapaneseText;
-
- CIntlTestPart* fIntlTestPart;
- };
-
- //========================================================================================
- // class CIntlTestSelectedContent
- //========================================================================================
-
- class CIntlTestSelectedContent : public FW_CContent
- {
- public:
- FW_DECLARE_AUTO(CIntlTestSelectedContent)
-
- CIntlTestSelectedContent(Environment* ev, CIntlTestPart* part);
- virtual ~CIntlTestSelectedContent();
-
- public:
- virtual void ExternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CPromise* promise,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean InternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CCloneInfo* cloneInfo);
-
- //----------------------------------------------------------------------------------------
- // New Stuff
- //
- FW_CString GetInternalizedText();
- void GetSelectedText(Environment* ev, FW_CString& text);
- void SetSelectedText(Environment* ev, const FW_CString& newText);
- void ClearSelectedText(Environment* ev);
- void SetSelectionRange(Environment* ev, short startOffset, short endOffset);
- void SetEditView(FW_CEditView* editView);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- CIntlTestPart* fIntlTestPart;
- FW_CEditView* fEditView; // selected edit view
- FW_CString fInternalizedText; // holds text that was just internalized
- };
-
- //----------------------------------------------------------------------------------------
- inline FW_CString CIntlTestSelectedContent::GetInternalizedText()
- {
- return fInternalizedText;
- }
-
- //----------------------------------------------------------------------------------------
- inline void CIntlTestSelectedContent::SetEditView(FW_CEditView* editView)
- {
- fEditView = editView;
- }
-
- //========================================================================================
- // Prototypes
- //========================================================================================
- FW_Boolean InternalizeIntlText(Environment* ev, ODStorageUnit* storageUnit, FW_CString& textData);
- FW_Boolean InternalizeText(Environment* ev, ODStorageUnit* storageUnit, FW_CString& textData);
-
-
- #endif